//
//  MyProfitFiveCell.m
//  NewPro
//
//  Created by 何荧红 on 2018/10/25.
//  Copyright © 2018 何荧红. All rights reserved.
//

#import "MyProfitFiveCell.h"

@interface MyProfitFiveCell ()
@property (nonatomic, strong) UILabel *addProfit;

@end

@implementation MyProfitFiveCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (void)setAddString:(NSString *)addString{
    _addString = addString;
    if (_addString) {
        self.addProfit.text = [NSString stringWithFormat:@"%@",_addString];
    }
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        self.frame = CGRectMake(0, 0, SCREEN_WIDTH, 70);
        [self CleanSubView];
    }
    return self;
}
- (void)CleanSubView{
    UILabel *typelab = [[UILabel alloc]init];
    typelab.font = [UIFont fontWithName:@"PingFang-SC-Regular" size:14];
    typelab.textColor = [UIColor colorWithHexString:@"333333"];
    typelab.text = @"调整金额";
    [self addSubview:typelab];
    [typelab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.mas_left).offset(14);
        make.top.equalTo(self.mas_top).offset(16);
        make.height.mas_equalTo(14);
    }];
    UILabel *subtypelab = [[UILabel alloc]init];
    subtypelab.font = [UIFont fontWithName:@"PingFang-SC-Regular" size:12];
    subtypelab.textColor = [UIColor colorWithHexString:@"333333"];
    subtypelab.text = @"(次月底更新)";
    [self addSubview:subtypelab];
    [subtypelab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(typelab.mas_right).offset(5);
        make.centerY.equalTo(typelab.mas_centerY);
    }];
    self.addProfit = [[UILabel alloc]init];
    _addProfit.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:14];
    _addProfit.textColor = [UIColor colorWithHexString:@"F86912"];
    _addProfit.text = @"+0.00";
    [self addSubview:_addProfit];
    [_addProfit mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.mas_right).offset(-14);
        make.centerY.equalTo(typelab.mas_centerY);
    }];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
